package com.dashang.feecenter.controller;

import com.dashang.feecenter.bean.FeeAllotBean;
import com.dashang.feecenter.service.FeeAllotService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 费用下拨
 *
 * @author Yulongyu
 * @since 2019/6/12
 */
@RestController
@Slf4j
public class FeeAllotConsumerController {

    @Autowired
    private FeeAllotService feeAllotService;


    @GetMapping("/getSpInfo")
    public FeeAllotBean getSpInfo(@RequestParam("id") String id ){
        FeeAllotBean bean = new FeeAllotBean();
        bean = feeAllotService.processFeeAllot(id);
        return bean;
    }

    @GetMapping("/getSpInfoList")
    public List<FeeAllotBean> getSpInfoList(@RequestParam("id") String id ){
        List<FeeAllotBean> bean = new ArrayList<>();
        bean = feeAllotService.processFeeAllotList(id);
        return bean;
    }
}
